<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.ViewEmployeesTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputText value="#{bundle.ViewEmployeesLabel_firstName}"/>
                    <h:outputText value="#{employeesController.selected.firstName}" title="#{bundle.ViewEmployeesTitle_firstName}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_lastName}"/>
                    <h:outputText value="#{employeesController.current.lastName}" title="#{bundle.ViewEmployeesTitle_lastName}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_personalEmail}"/>
                    <h:outputText value="#{employeesController.current.personalEmail}" title="#{bundle.ViewEmployeesTitle_personalEmail}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_businessEmail}"/>
                    <h:outputText value="#{employeesController.current.businessEmail}" title="#{bundle.ViewEmployeesTitle_businessEmail}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_address}"/>
                    <h:outputText value="#{employeesController.current.address}" title="#{bundle.ViewEmployeesTitle_address}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_birthDate}"/>
                    <h:outputText value="#{employeesController.current.birthDate}" title="#{bundle.ViewEmployeesTitle_birthDate}">
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:outputText>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_nationality}"/>
                    <h:outputText value="#{employeesController.current.nationality}" title="#{bundle.ViewEmployeesTitle_nationality}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_maritalStatus}"/>
                    <h:outputText value="#{employeesController.current.maritalStatus}" title="#{bundle.ViewEmployeesTitle_maritalStatus}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_gender}"/>
                    <h:outputText value="#{employeesController.current.gender}" title="#{bundle.ViewEmployeesTitle_gender}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_skype}"/>
                    <h:outputText value="#{employeesController.current.skype}" title="#{bundle.ViewEmployeesTitle_skype}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_phoneNumber}"/>
                    <h:outputText value="#{employeesController.current.phoneNumber}" title="#{bundle.ViewEmployeesTitle_phoneNumber}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_mobile1}"/>
                    <h:outputText value="#{employeesController.current.mobile1}" title="#{bundle.ViewEmployeesTitle_mobile1}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_mobile2}"/>
                    <h:outputText value="#{employeesController.current.mobile2}" title="#{bundle.ViewEmployeesTitle_mobile2}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_kinName}"/>
                    <h:outputText value="#{employeesController.current.kinName}" title="#{bundle.ViewEmployeesTitle_kinName}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_kinRelationship}"/>
                    <h:outputText value="#{employeesController.current.kinRelationship}" title="#{bundle.ViewEmployeesTitle_kinRelationship}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_kinPhoneNumber}"/>
                    <h:outputText value="#{employeesController.current.kinPhoneNumber}" title="#{bundle.ViewEmployeesTitle_kinPhoneNumber}"/>

                    <h:outputText value="#{bundle.ViewEmployeesLabel_kinEmail}"/>
                    <h:outputText value="#{employeesController.current.kinEmail}" title="#{bundle.ViewEmployeesTitle_kinEmail}"/>

                </h:panelGrid>
                <br />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;


                <h:panelGrid rendered="#{type == 'admin'}">
                    <h:commandButton action="editprofile" type="submit" value="#{bundle.ViewEmployeesEditLink}"/>
                    <h:commandButton value="#{bundle.ViewEmployeesIndexLink}" action="/index" type="submit" />
                </h:panelGrid>
                
                <h:panelGrid rendered="#{type == 'user'}">
                    <h:commandButton action="editprofile" type="submit" value="#{bundle.ViewEmployeesEditLink}"/>
                    <h:commandButton value="#{bundle.ViewEmployeesIndexLink}" action="/userhome" type="submit" />
                </h:panelGrid>

            </h:form>
        </ui:define>
    </ui:composition>
</html>
